#include <iostream>
using namespace std;

int main() {
    int n, a = 0, b = 1, c ,sum = 0;
    cin >> n;
    sum = 1;
    if (n == 0) {
        sum = 0;
    }
    else if (n == 1) {
        sum = 1;
    }
    else {
        while (n > 1){
            c = a + b;
            a = b;
            b = c;
            sum += c;
            n -= 1;
        }
    }
    cout << sum;
    return 0;
}
//时间复杂度为O(n)